Generating Signed APKs
By Alex Schendel
This tutorial will show you how to generate a signed APK from Android Studio. An APK is an “Android Application Package” and allows users to install apps. Ensuring that your APK is signed is vital to allowing others to install your app. Firstly, the Google Play Store requires signed APKs for uploads to their servers. Secondly, even if you do not upload your apps to the Google Play Store, android devices have safety precautions which prevent users from installing unsigned APKs without disabling this precaution. Thus, in order to avoid all these headaches, if you want anyone other than you to use your app, it would be in your best interest to start generating signed APKs.
1. In your app, locate the tab labeled “Build” and click the Generate Signed APK button.
2. Then click “Create New” Underneath “Key Store Path”
3.
Browse your hard disk to find a good path to save your key store
to and then name it. It will be saved as a “.jks” file.
4. Then you can fill out the password without special characters, create an alias which you can remember, and create a second password for the alias and fill out certificate information.
5. Now you are ready to generate your first signed APK! Just ensure that the Key store path is correct and enter the password, enter the Key alias, and enter the Key password.
6. Next, it will ask you to choose a destination folder. I created a folder under my Files folder to hold my Android Keys and APKs to keep them closer to the surface and easier to access.
7. Once you hit finish, it will rebuild you gradle and then it will create the APK in the destination folder! Now you have an APK you can distribute to others! Unfortunately, they will still have to disable the security setting preventing them from installing apps that are not from google play, but at least your app will not be flagged by Android for missing its certificate. Once you learn to scale for different screen sizes in the Game tutorials, you will be even closer to creating and app ready for the mass distribution capabilities of Google Play!